package com.cq.hd.task.web.job;

import com.cq.hd.member.api.TbBusinessApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class BusinessMemberTask {

    @Autowired
    private TbBusinessApi businessApi;

    // 每天凌晨0点10分执行一次    0 10 0 * * ?
    @XxlJob("scanBusinessMemberExpire")
    public void execute() {
        log.info("扫描商家会员是否过期=====>开始");
        businessApi.scanBusinessMemberExpireJob();
        log.info("扫描商家会员是否过期=====>结束");
    }
}
